﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace UBlockly
{
    internal class SoundHelper
    {
        private AudioSource audioSource;

        public void Init(GameObject go)
        {
            audioSource = go.AddCompontentIfNoExist<AudioSource>();
        }
        public void PlayClip(AudioClip clip)
        {
            audioSource.clip = null;
            audioSource.clip = clip;
            audioSource.Play();
        }
    }

}

